﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Entity.Info;
using BusinessLogicLayer.GiaoVu;
using DAL;

namespace QuanLyDoAn.SinhVien
{
    public partial class Evaluation : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            
                LoadName();
            
            if (Session["UserName"] == null || int.Parse(Session["Role"].ToString()) != 4)
            {
                //Nếu vi phạm 1 trong 2 điều này thì chuyển sang thông báo lỗi hoặc về Trang Chủ
                Response.Redirect("~/SinhVien/Login.aspx");
            }

        }
        private void LoadName()
        {
            try
            {
                Results_RegistrationInfo rr = new Results_RegistrationInfo();
                rr = Results_RegistrationFuntion.Results_Registration_FindByID_Student(Session["UserName"].ToString().Trim());
                lbID_Student1.Text = rr.ID_Student;
                lbStudent_Name1.Text = rr.Name_Student;
                lbID_Schemes1.Text = rr.ID_Schemes;
                lbSchemes_Name1.Text = rr.Name_Schemes;
                if (rr.Results == null)
                {
                    lbScore1.Text = "0";
                    rr.Results = 0;
                }
                else
                {
                    lbScore1.Text = ConverType.ToString(rr.Results);
                }
              
            }
            catch (Exception)
            {

                
            }
        }
    }
}